package com.happyfamily.springboot.crowdsourcingplatform.service.pan;

import com.happyfamily.springboot.crowdsourcingplatform.base.result.Results;
import com.happyfamily.springboot.crowdsourcingplatform.dto.NeedDto;
import com.happyfamily.springboot.crowdsourcingplatform.model.Need;
import com.happyfamily.springboot.crowdsourcingplatform.model.ServerType;
import com.happyfamily.springboot.crowdsourcingplatform.model.SysUser;

import java.lang.reflect.Type;
import java.util.List;

/**
 * @Author Administrator
 * @create 2020/02/15 21:52
 */
public interface UserService
{


	/**
	 * 保存用户信息
	 * @param user
	 * @return
	 */
	Results save(SysUser user,Integer roleId,Integer sid);


	/**
	 * 查询用户手机是否有重复
	 * @param uphone
	 * @return
	 */
	SysUser getUserByPhone(String uphone);

	/**
	 * 根据用户账号查询信息
	 * @param uaccount
	 * @return
	 */
	SysUser getUser(String uaccount);

	Results<SysUser> getAllEmployers(Integer startPosition, Integer limit);

	String resetPassword(Long uid);

	String changeStates(Long uid,Long pid);

	Results<SysUser> getSpecifyEmployers(String uname,Integer startPosition, Integer limit);

	String getEmployersStates(Long pid);

	Results<SysUser> getServiceProvidersList(Integer startPosition, Integer limit);

	String getServiceProvidersStates(Integer id);


	/**
	 * 根据父级sparentid获取父级集合
	 * @param sparentid
	 * @return
	 */
	List<ServerType> findById(long sparentid);


	/**
	 * 根据父级id获取子级集合
	 * @param sid
	 * @return
	 */
	List<ServerType> Status(long sid);

	/**
	 * 保存雇主发布的需求
	 * @param need
	 * @return
	 */
	Results savePublishing(Need need,String nuseraccount);


	/**
	 * 查询所有的服务商
	 * @param i
	 * @return
	 */
	List<SysUser> findByRid(Integer i);
}
